package rule;

import entity.Student;

/**
 * <p>
 * 学生对象规则
 * </P>
 *
 * @author dingwen
 * @date 2021.09.09 10:34
 */
public class Student2Rule extends AbstractBaseRule<Student, String> {
    @Override
    Student executeObject(RuleDto<String> ruleDto) {
        String value = ruleDto.getValue();
        Student student = new Student();
        if ("张三".equals(value)) {
            student.setName("张三");
        } else {
            student.setName("李四");
        }
        return student;
    }
}
